package mx.gob.imss.reiman.clientes.model;

import java.io.Serializable;

/**
 * 
 * @author Alberto Dzul Calvillo
 * @version 1.0
 * 
 */
public class Medida implements Serializable {
	private static final long serialVersionUID = 1L;
	private String cveTipoMedida;
	private String numValor;
	private String stpValor;
	private String refValor;

	public Medida() {
		super();
		this.cveTipoMedida = "";
		this.numValor = "";
		this.stpValor = "";
		this.refValor = "";
	}

	public Medida(String cveTipoMedida, String numValor, String stpValor,
			String refValor) {
		super();
		this.cveTipoMedida = cveTipoMedida;
		this.numValor = numValor;
		this.stpValor = stpValor;
		this.refValor = refValor;
	}

	public String getCveTipoMedida() {
		return cveTipoMedida;
	}

	public void setCveTipoMedida(String cveTipoMedida) {
		this.cveTipoMedida = cveTipoMedida;
	}

	public String getNumValor() {
		return numValor;
	}

	public void setNumValor(String numValor) {
		this.numValor = numValor;
	}

	public String getStpValor() {
		return stpValor;
	}

	public void setStpValor(String stpValor) {
		this.stpValor = stpValor;
	}

	public String getRefValor() {
		return refValor;
	}

	public void setRefValor(String refValor) {
		this.refValor = refValor;
	}

	@Override
	public String toString() {
		return "Medida [cveTipoMedida=" + cveTipoMedida + ", numValor="
				+ numValor + ", stpValor=" + stpValor + ", refValor="
				+ refValor + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((cveTipoMedida == null) ? 0 : cveTipoMedida.hashCode());
		result = prime * result
				+ ((numValor == null) ? 0 : numValor.hashCode());
		result = prime * result
				+ ((refValor == null) ? 0 : refValor.hashCode());
		result = prime * result
				+ ((stpValor == null) ? 0 : stpValor.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof Medida)) {
			return false;
		}
		Medida other = (Medida) obj;
		if (cveTipoMedida == null) {
			if (other.cveTipoMedida != null) {
				return false;
			}
		} else if (!cveTipoMedida.equals(other.cveTipoMedida)) {
			return false;
		}
		if (numValor == null) {
			if (other.numValor != null) {
				return false;
			}
		} else if (!numValor.equals(other.numValor)) {
			return false;
		}
		if (refValor == null) {
			if (other.refValor != null) {
				return false;
			}
		} else if (!refValor.equals(other.refValor)) {
			return false;
		}
		if (stpValor == null) {
			if (other.stpValor != null) {
				return false;
			}
		} else if (!stpValor.equals(other.stpValor)) {
			return false;
		}
		return true;
	}
}